package com.cssl.openFeign;

import com.cssl.domain.DtsBrand;
import com.cssl.domain.DtsGoods;
import com.cssl.domain.dto.DtsBrandDto;
import com.cssl.domain.dto.GoodsDto;
import com.cssl.domain.dto.GoodsSearchDto;
import com.cssl.domain.dto.PageDto;
import com.cssl.util.InfoCode;
import com.cssl.util.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@FeignClient(value = "DtsShopProvider9090",path = "/goods",contextId = "2")
public interface GoodsFeignClient {
    @PostMapping("/firstPageGoods")
    Result showFirstPageGoods(@RequestBody com.cssl.domain.Page page);

    /**
     * (根据浏览量和销售量判断)
     *
     * @return
     */
    @PostMapping("/prodList")
    Result getTwoHotGoods();

    @PostMapping("/goodsList")
    Result getGoodsList(@RequestBody GoodsDto goodsDto);

    /**
     * 商品总数
     *
     * @return
     */
    @PostMapping("/goodsCount")
    Result getTotalGoodsCount();

    @PostMapping("/indexImgs")
    Result getCarouselImage();

    @PostMapping("/topNotice")
    Result topNoticeList();

    @PostMapping("/firstPageInfo")
    Result getFirstPage();

    @PostMapping("/notice")
    Result getNotice(@RequestBody Map map);

    /**
     * 查询三级商品分类
     *
     * @param map categoryId page size
     * @return totalPages ,  goodsList
     */
    @PostMapping("/getLevel3")
    Result getLevel3(@RequestBody Map<String, Object> map);

    /**
     * 根据id获得商品所有的信息
     *
     * @param map id
     * @return
     */
    @PostMapping("/getGoodsInfoById")
    Result getGoodsInfoById(@RequestBody Map map);

    /**
     * 搜索关键字
     *
     * @return hotKeyWordList ,  goodsKeyWordList
     */
    @PostMapping("/searchHelp")
    Result searchHelp();

    /**
     * 模糊查询商品
     *
     * @param searchDto
     * @return
     */
    @PostMapping("/searchGoods")
    Result searchGoods(@RequestBody GoodsSearchDto searchDto);

    /**
     * 具体商品的规格
     *
     * @param map 商品id goodsId
     * @return
     */
    @PostMapping("/goodsSpecifications")
    Result goodsSpecifications(@RequestBody Map map);

    @PostMapping("/getBrandById")
    Result getBrandById(@RequestBody Map map);

    @PostMapping("/getGoodsByBrandId")
    Result getGoodsByBrandId(@RequestBody DtsBrandDto dto);

    @PostMapping("/getHotOrNewGoods")
     Result getHotAndNewGoods(@RequestBody PageDto dto);

    @PostMapping("/relevantData")
    Result relevantData(@RequestBody Map map);

    @PostMapping("/getAllBrand")
    Result getAllBrand(@RequestBody Map map);

    @PostMapping("/checkedSpecPrice")
     Result checkedSpecPrice(@RequestBody Map map);

    @PostMapping("/goodsOnShelf")
    Result goodsOnShelf(@RequestBody Map map);

    @PostMapping("/getGoodsRelated")
    Result getGoodsRelated(@RequestBody DtsGoods goods);

    @PostMapping("/getGoodsAllInfoById")
    Result getGoodsAllInfoById(@RequestBody Map map);

    @PostMapping("/updateGoodsAllInfoById")
    Result updateGoodsAllInfoById(@RequestBody Map map);

    @PostMapping("/deleteGoodsById")
    Result deleteGoodsById(@RequestBody Map map);

    @PostMapping("/goodsInOrder")
    Result goodsInOrder(@RequestBody Integer goodsId);

     @PostMapping("/groupOnShow")
     Result groupOnShow(@RequestBody DtsGoods goods);
}

